﻿using Microsoft.IdentityModel.Tokens;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.Model.Models.ProductionControl;

namespace CKS.PLC.Action
{
    public  abstract partial class PLCAction
    {
        /// <summary>
        /// 热重载后输出此版本信息
        /// </summary>
        public static void ShowVersion()
        {
            EventBus.AddLog("CKS.PLC.Action:25.5.20.0606");
        }

        /// <summary>
        /// 获取字符串后缀
        /// </summary>
        /// <param name="content"></param>
        /// <param name="len"></param>
        /// <returns></returns>
        public string GetSuffix(string content, int len = 4)
        {
            if (content.IsNullOrEmpty())
                return "";
            if (content.Length < len)
                return "";
            return content.Substring(content.Length - len);
        }
    }
}
